package cn.tedu._05weibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NonNull;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

@Data
public class UserRegDTO {
    @Pattern(regexp = "^(?:(?:[a-zA-Z0-9]{1,14}$)|(?:[\u4e00-\u9fa5]{1,7}$))$",
            message = "字符串必须为最长4个英文或7个汉字")
    @ApiModelProperty(value = "用户名",required = true)
    private String username;
    @ApiModelProperty(value = "密码",required = true)
    private String password;
    @ApiModelProperty(value = "昵称",required = true)
    private String nickname;
}
